-- GENERATED SPELL FOR [Rookery Hatcher] --


function spell0_10683(pUnit, Event) --@Hatch Rookery Egg,n/a--
pUnit:FullCastSpellOnTarget(15746,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10683', 1000, 1)
end

function spell1_10683(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(15580,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10683', 537, 1)
end

function spell2_10683(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(15572,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10683', 30259, 1)
end

function Sorts_10683(pUnit, Event)
local choix_sorts_10683 = math.random(0, 2)
if choix_sorts_10683 == 0 then
pUnit:RegisterEvent('spell0_10683', 1, 1)
end
if choix_sorts_10683 == 1 then
pUnit:RegisterEvent('spell1_10683', 1, 1)
end
if choix_sorts_10683 == 2 then
pUnit:RegisterEvent('spell2_10683', 1, 1)
end
end

function mob10683_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10683', math.random(1500, 3000), 1)
end

function mob10683_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10683_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10683_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10683, 1, 'mob10683_Action')
RegisterUnitEvent(10683, 2, 'mob10683_Leave')
RegisterUnitEvent(10683, 3, 'mob10683_Kill')
RegisterUnitEvent(10683, 4, 'mob10683_Die')
